import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const SYSTEM: AppRouteRecordRaw = {
  path: '/system',
  name: 'system',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '系统管理',
    requiresAuth: true,
    icon: 'icon-list',
    order: 2,
  },
  children: [
    {
      path: '/system/user', // 用户管理
      name: 'systemUser',
      component: () => import('@/views/system/user/index.vue'),
      meta: {
        locale: '用户管理',
      },
    },
    {
      path: '/system/role', // 角色管理
      name: 'systemRole',
      component: () => import('@/views/system/role/index.vue'),
      meta: {
        locale: '角色管理',
      },
    },
    {
      path: '/system/menu', // 菜单管理
      name: 'systemMenu',
      component: () => import('@/views/system/menu/index.vue'),
      meta: {
        locale: '菜单管理',
      },
    },
    {
      path: '/system/level', // 职级管理
      name: 'systemLevel',
      component: () => import('@/views/system/level/index.vue'),
      meta: {
        locale: '职级管理',
      },
    },
    {
      path: '/system/dict', // 字典管理
      name: 'systemDict',
      component: () => import('@/views/system/dict/index.vue'),
      meta: {
        locale: '字典管理',
      },
    },
    {
      path: '/system/log', // 系统日志
      name: 'systemLog',
      component: () => import('@/views/system/log/index.vue'),
      meta: {
        locale: '系统日志',
      },
    },
    {
      path: '/system/file', // 文件管理
      name: 'systemFile',
      component: () => import('@/views/system/file/index.vue'),
      meta: {
        locale: '文件管理',
      },
    },
  ],
};

export default SYSTEM;
